package net.devkit.core.pojo.db;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the sys_dr database table.
 * 
 */
@Embeddable
public class SysDrPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private int depId;
	private String roleId;

    public SysDrPK() {
    }

	@Column(name="DEP_ID", unique=true, nullable=false)
	public int getDepId() {
		return this.depId;
	}
	public void setDepId(int depId) {
		this.depId = depId;
	}

	@Column(name="ROLE_ID", unique=true, nullable=false)
	public String getRoleId() {
		return this.roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SysDrPK)) {
			return false;
		}
		SysDrPK castOther = (SysDrPK)other;
		return 
			(this.depId == castOther.depId)
			&& this.roleId.equals(castOther.roleId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.depId;
		hash = hash * prime + this.roleId.hashCode();
		
		return hash;
    }
}